package com.hvgroup.modules.sanic.domain.dto;

import lombok.*;

@ToString
@Getter
@Builder
public class TaskResult {

    private final Integer code;
    private final String msg;
    private final Object data;

    public static TaskResult success(Object data) {
        return TaskResult.builder().code(200).msg("ok").data(data).build();
    }

    public static TaskResult failre(Object data) {
        return TaskResult.builder().code(9999).msg("系统异常").data(data).build();
    }
}
